#include "tcpserver.hpp"
#include "dict.hpp"
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        std::cout << "usage : " << argv[0] << " port" << std::endl;
        exit(1);
    }
    uint16_t port = std::stoi(argv[1]);
    Dict d;
    d.Load();
    TcpServer tsvr(port, [&d](std::string english) -> std::string
                   { return d.Translate(english); });
    tsvr.Init();
    tsvr.Start();
    return 0;
}